<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/3/19
 * Time: 09:48
 */

namespace App;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Cart extends Model
{
    use SoftDeletes;
    // 表名称
    protected $table = 'cart';
    // 开启自动时间戳
    public $timestamps = true;
    // 日期都存储为时间戳
    protected $dateFormat = 'U';

    public function goods()
    {
        return $this->belongsTo('App\Goods', 'goods_id', 0);
    }
}